<template>
  <div id="app">
    <!-- <router-view/> -->
  <p>是否缓存数据:  {{$route.meta.keepAlive}}</p>
  <hr/>
    <keep-alive>
        <router-view v-if="$route.meta.keepAlive">
            <!-- 这里是会被缓存的视图组件，比如 Home！ -->
        </router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive">
            <!-- 这里是会被缓存的视图组件，比如 Home！ -->
        </router-view>
  </div>
</template>

<script>
export default {
  name: "App"
};
</script>

<style>
</style>
